Function Reference
AppendFileWithFile
Appends one file to another file.
Syntax:
wwfilesystem:AppendFileWithFile($targetPath, $sourcePath)
Parameters:
Name
Type
Description
targetPath
string
Full pathname of the target file.
sourcePath
string
Full pathname of the source file.
Returns:
bool: True if it succeeds, false if it fails.
Example:

<xsl:variable name="VarADoc">C:\\File\Sample\Doc.txt</xsl:variable>
<xsl:variable name = "VarAllDocs" > C:\\Output\All\Content.txt</xsl:variable>
<xsl:variable name = "ActionAppendingDocToAllContent" select="wwfilesystem:AppendFileWithFile($VarAllDocs, $VarADoc)" />

ChecksumUpToDate
Compares the provided checksum with the current checksum.
This is a convenience method for XSL developers.
Syntax:
wwfilesystem:ChecksumUpToDate($path, $checksum)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
checksum
string
The checksum.
Returns:
bool: True if the same, false if not the same.

Combine
Combines the given component(s) to the file path.
Syntax:
wwfilesystem:Combine($path, $component)
wwfilesystem:Combine($path, $component1, $component2)
wwfilesystem:Combine($path, $component1, $component2, $component3)
wwfilesystem:Combine($path, $component1, $component2, $component3, $component4)
wwfilesystem:Combine($path, $component1, $component2, $component3, $component4, $component5)
wwfilesystem:Combine($path, $component1, $component2, $component3, $component4, $component5, $component6)
wwfilesystem:Combine($path, $component1, $component2, $component3, $component4, $component5, $component6, $component7)
wwfilesystem:Combine($path, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8)
wwfilesystem:Combine($path, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9)
wwfilesystem:Combine($path, $component1, $component2, $component3, $component4, $component5, $component6, $component7, $component8, $component9, $component10)
Overloads:
#
Parameters
1
path, component
2
path, component1, component2
3
path, component1, component2, component3
4
path, component1, component2, component3, component4
5
path, component1, component2, component3, component4, component5
6
path, component1, component2, component3, component4, component5, component6
7
path, component1, component2, component3, component4, component5, component6, component7
8
path, component1, component2, component3, component4, component5, component6, component7, component8
9
path, component1, component2, component3, component4, component5, component6, component7, component8, component9
10
path, component1, component2, component3, component4, component5, component6, component7, component8, component9, component10
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
component
string
The component.
component1
string
The first component.
component2
string
The second component.
component3
string
The third component.
component4
string
The fourth component.
component5
string
The fifth component.
component6
string
The component 6.
component7
string
The component 7.
component8
string
The component 8.
component9
string
The component 9.
component10
string
The component 10.
Returns:
string: A string.
Example:

<xsl:variable name="VarOutputPath" select="wwfilesystem:Combine($VarBaseDir, 'output.html')" />

CopyDirectoryFiles
Copies all files from the source directory to the destination directory. Destination files are reported as <FILE> elements. Source files are reported as <Depends> elements for each destination file.
Syntax:
wwfilesystem:CopyDirectoryFiles($sourceDirectoryPath, $destinationDirectoryPath)
Parameters:
Name
Type
Description
sourceDirectoryPath
string
Pathname of the source directory.
destinationDirectoryPath
string
Pathname of the destination directory.
Returns:
XPathNodeIterator: A node set.

CopyFile
Copies the source file to the destination path. Destination files are reported as <FILE> elements. Source files are reported as <Depends> elements for each destination file.
Syntax:
wwfilesystem:CopyFile($sourcePath, $destinationPath)
Parameters:
Name
Type
Description
sourcePath
string
Full pathname of the source file.
destinationPath
string
Full pathname of the destination file.
Returns:
XPathNodeIterator: A node set.
Example:

<xsl:variable name="VarCopyResult" select="wwfilesystem:CopyFile($VarSourceFile, $VarOutputDir)" />

CreateDirectory
Creates a directory with the given path. If the directory already exists, the method will return false().
Syntax:
wwfilesystem:CreateDirectory($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
bool: True if it succeeds, false if it fails.
Example:

<xsl:if test="wwfilesystem:Exists('C:\\exists')">
<xsl:variable name = "VarCreateDirectory" select="wwfilesystem:CreateDirectory('C:\\exists')" />
</xsl:if>

DeleteDirectory
Recursively deletes the directory with the given path.
Syntax:
wwfilesystem:DeleteDirectory($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the directory.
Example:

<xsl:variable name="VarDeleteDirectory" select="wwfilesystem:DeleteDirectory('C:\\deleteme')" />

DeleteFile
Deletes the file described by path.
Syntax:
wwfilesystem:DeleteFile($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.

DirectoryExists
Determines if a directory exists at the given path. If a file exists with the given path, this method will return false().
Syntax:
wwfilesystem:DirectoryExists($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
bool: True if it succeeds, false if it fails.
Example:

<xsl:if test="wwfilesystem:DirectoryExists('C:\\direxists')">
<xsl:variable name = "VarLog" select="wwlog:Message('Directory \'', 'C:\\direxists', '\' exists!')" />
</xsl:if>

Exists
Determine if file or directory 'path' exists.
Syntax:
wwfilesystem:Exists($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
bool: True if it succeeds, false if it fails.
Example:

<xsl:if test="wwfilesystem:Exists('C:\\exists')">
<xsl:variable name = "VarCreateDirectory" select="wwfilesystem:CreateDirectory('C:\\exists')" />
</xsl:if>

FileExists
Determines if a file exists at the given path. If directory exists with the given path, this method will return false().
Syntax:
wwfilesystem:FileExists($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
bool: True if it succeeds, false if it fails.
Example:

<xsl:if test="wwfilesystem:DirectoryExists('C:\\fileexists')">
<xsl:variable name = "VarLog" select="wwlog:Message('Directory \'', 'C:\\fileexists', '\' exists!')" />
</xsl:if>

FilesEqual
Compares the contents of two files to determine if they are equal.
Syntax:
wwfilesystem:FilesEqual($alphaPath, $betaPath)
Parameters:
Name
Type
Description
alphaPath
string
Full pathname of the first file.
betaPath
string
Full pathname of the second file.
Returns:
bool: True if equal, false if not.

GetAbsoluteFrom
Determines an absolute path given a relative path and a reference path to create the absolute path from. Returns the relative path argument if it is absolute to begin with.
Syntax:
wwfilesystem:GetAbsoluteFrom($relativePath, $referencePath)
Parameters:
Name
Type
Description
relativePath
string
Pathname of the relative file.
referencePath
string
Full pathname of the reference file.
Returns:
string: The absolute from.

GetBaseName
Gets the base name of any path. It handles as separators: '' and '/'. If the path ends with a separator or it's an empty string then it returns an empty string.
Syntax:
wwfilesystem:GetBaseName($path)
Parameters:
Name
Type
Description
path
string
The relative or absolute path.
Returns:
string: A base name string.

GetChecksum
Determines the checksum for the specified file.
Syntax:
wwfilesystem:GetChecksum($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
string: The checksum as string.

GetDirectoryName
Determines the directory prefix of the given path.
Syntax:
wwfilesystem:GetDirectoryName($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
string: The directory name.
Example:

<xsl:variable name="VarDir" select="wwfilesystem:GetDirectoryName($VarFilePath)" />

GetExtension
Determines the file extension for the given path.
Syntax:
wwfilesystem:GetExtension($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
string: The filename extension.
Example:

<xsl:variable name="VarExt" select="wwfilesystem:GetExtension($VarFilePath)" />
<xsl:if test="$VarExt = '.html'">
<!-- Process HTML file -->
</xsl:if>

GetFileName
Determines the name of the file with the directory prefix removed.
Syntax:
wwfilesystem:GetFileName($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
string: The file basename.
Example:

<xsl:variable name="VarFileName" select="wwfilesystem:GetFileName($VarFilePath)" />

GetFileNameWithoutExtension
Determines the name of the file with the directory prefix and extension removed.
Syntax:
wwfilesystem:GetFileNameWithoutExtension($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
string: The file name without extension or directory prefix.

GetFiles
Returns an XML node set containing absolute file paths to all files in the specified path. If the path specifies a file, a single file entry will be returned. If the path specifies a directory, all file paths in the directory and their children are returned.
Syntax:
wwfilesystem:GetFiles($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file or directory.
Returns:
XPathNodeIterator: The files in a node set.

GetLongPathName
Gets long path name of a specified short path filename.
Syntax:
wwfilesystem:GetLongPathName($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
string: The long path filename.

GetRelativeFiles
Returns an XML node set containing RELATIVE file paths to all files in the specified path. If the path specifies a file, a single file entry will be returned. If the path specifies a directory, all file paths in the directory and their children are returned.
Filename path(s) created will be relative to 'relativeToPath' (if non-zero in length).
Syntax:
wwfilesystem:GetRelativeFiles($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
XPathNodeIterator: The relative files in a node set.

GetRelativeTo
Determines the relative path from the absolute anchor path to the absolute destination path.May return an absolute path if no relative path exists.
Syntax:
wwfilesystem:GetRelativeTo($path, $anchorPath)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
anchorPath
string
Full pathname of the anchor file.
Returns:
string: The relative to path.

GetShortPathName
Gets short path filename from a specified filename.
Syntax:
wwfilesystem:GetShortPathName($path)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
Returns:
string: The short path name.

GetTempFileName
Gets temporary unique filename path.
Syntax:
wwfilesystem:GetTempFileName()
Returns:
string: The temporary filename path.

GetTempPath
Gets path to the user's temporary files directory.
Syntax:
wwfilesystem:GetTempPath()
Returns:
string: The directory path ending with backslash.

GetWithExtensionReplaced
Replaces the current file extension with the provided one.
Syntax:
wwfilesystem:GetWithExtensionReplaced($path, $extension)
Parameters:
Name
Type
Description
path
string
Full pathname of the file.
extension
string
The extension.
Returns:
string: The with extension replaced.

MakeValidFileName
Makes a valid filename by eliminating the invalid characters from the specified seed filename.
Syntax:
wwfilesystem:MakeValidFileName($fileNameSeed)
Parameters:
Name
Type
Description
fileNameSeed
string
The file name seed.
Returns:
string: A filename string.

TranslateFileToEncoding
Translate file to encoding.
Syntax:
wwfilesystem:TranslateFileToEncoding($sourceFilePath, $sourceFileEncodingName, $destinationFilePath, $destinationFileEncodingName)
Parameters:
Name
Type
Description
sourceFilePath
string
Full pathname of the source file.
sourceFileEncodingName
string
Name of the source file encoding.
destinationFilePath
string
Full pathname of the destination file.
destinationFileEncodingName
string
Name of the destination file encoding.

Was this helpful?
Last modified date: 01/12/2026